unit untCadFuncionario;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, untCadPadrao, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinBlack, dxSkinBlue,
  dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinFoggy,
  dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
  dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMoneyTwins,
  dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
  dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinPumpkin, dxSkinSeven,
  dxSkinSharp, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
  dxSkinSummer2008, dxSkinsDefaultPainters, dxSkinValentine,
  dxSkinXmas2008Blue, dxSkinscxPCPainter, cxStyles, cxCustomData, cxFilter,
  cxData, cxDataStorage, cxEdit, DB, cxDBData, dxSkinsdxBarPainter, ADODB,
  cxIntlBase, cxintl, cxPropertiesStore, ACBrBase, ACBrEnterTab,
  cxGridCustomPopupMenu, cxGridPopupMenu, dxBarDBNav, ImgList, ActnList,
  dxBar, cxClasses, ExtCtrls, cxGridLevel, cxGridCustomView,
  cxGridCustomTableView, cxGridTableView, cxGridBandedTableView,
  cxGridDBBandedTableView, cxGrid, cxPC, cxContainer, cxLabel, cxTextEdit,
  cxDBEdit, cxCalc, cxMaskEdit, cxDropDownEdit, cxCalendar, cxGroupBox;

type
  TfrmCadFuncionario = class(TfrmCadPadrao)
    dtListcodigo: TAutoIncField;
    dtListMatriculaFuncCaixa: TWideStringField;
    dtListNomeFuncCaixa: TWideStringField;
    dtListCPFFuncCaixa: TWideStringField;
    dtListFuncaoCargo: TWideStringField;
    GridDBBandedTableView2codigo: TcxGridDBBandedColumn;
    GridDBBandedTableView2MatriculaFuncCaixa: TcxGridDBBandedColumn;
    GridDBBandedTableView2NomeFuncCaixa: TcxGridDBBandedColumn;
    GridDBBandedTableView2CPFFuncCaixa: TcxGridDBBandedColumn;
    GridDBBandedTableView2FuncaoCargo: TcxGridDBBandedColumn;
    cxDBTextEdit3: TcxDBTextEdit;
    cxLabel3: TcxLabel;
    edtNome: TcxDBTextEdit;
    cxDBTextEdit1: TcxDBTextEdit;
    Label1: TcxLabel;
    Label2: TcxLabel;
    cxLabel1: TcxLabel;
    cxDBTextEdit2: TcxDBTextEdit;
    dtEditcodigo: TAutoIncField;
    dtEditMatriculaFuncCaixa: TWideStringField;
    dtEditNomeFuncCaixa: TWideStringField;
    dtEditCPFFuncCaixa: TWideStringField;
    dtEditFuncaoCargo: TWideStringField;
    dtEditSenha: TWideStringField;
    cxDBTextEdit4: TcxDBTextEdit;
    cxLabel2: TcxLabel;
    cxGroupBox1: TcxGroupBox;
    cxDBTextEdit5: TcxDBTextEdit;
    cxLabel4: TcxLabel;
    dtListSenha: TWideStringField;
    dtListDiretorioCFG: TWideStringField;
    dtEditDiretorioCFG: TWideStringField;
    cxDBTextEdit6: TcxDBTextEdit;
    cxLabel5: TcxLabel;
    cxDBTextEdit7: TcxDBTextEdit;
    cxLabel6: TcxLabel;
    dtEditSiricCFG: TWideStringField;
    dtEditFormCFG: TWideStringField;
    procedure dtEditSenhaGetText(Sender: TField; var Text: String;
      DisplayText: Boolean);
    procedure dtEditSenhaSetText(Sender: TField; const Text: String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCadFuncionario: TfrmCadFuncionario;

implementation

uses Funcoes;

{$R *.dfm}

procedure TfrmCadFuncionario.dtEditSenhaGetText(Sender: TField;
  var Text: String; DisplayText: Boolean);
begin
  inherited;
  Text :=  Decrypt(Sender.AsString);
end;

procedure TfrmCadFuncionario.dtEditSenhaSetText(Sender: TField;
  const Text: String);
begin
  inherited;
  Sender.value :=  encrypt(Text);
end;

end.
